package com.seejoke.tomcat.redissessions;

import java.io.IOException;

/** @author yangzhongying */
public interface Serializer {
  void setClassLoader(ClassLoader loader);

  byte[] attributesHashFrom(RedisSession session) throws IOException;

  byte[] serializeFrom(RedisSession session, SessionSerializationMetadata metadata)
      throws IOException;

  void deserializeInto(byte[] data, RedisSession session, SessionSerializationMetadata metadata)
      throws IOException, ClassNotFoundException;
}
